package com.cmschina.mybatis;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: li chao
 * @Desc:
 * @create: 2024-08-06 14:56
 **/
@Configuration
public class MybatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();

        // 自定义拦截器，先添加先执行。
        interceptor.addInnerInterceptor(new MybatisPlusIntercepts());
        return interceptor;
    }
}